import React, {Component} from 'react';
import {
  SafeAreaView,
  StyleSheet,
  View,
  Text,
  StatusBar,
  BackHandler,
} from 'react-native';
import {postRequest} from '../util/fetch';

export default class FetchTest extends Component {
  async componentDidMount(): void {
    const url = '/account/login.shtml';
    const data = {
      username: 'ysumg',
      password: '18830543657',
    };
    const result = await postRequest(url, ...data);
    console.log('result', result.error_code);
  }

  render() {
    return <Text>出现吧！</Text>;
  }
}
